import nunjucks from 'nunjucks'

let fn_list = async(ctx)=>{
    nunjucks.configure('.views',{autoescape:true});
    nunjucks.render('index.html',{foo:"ber"});

}
let fn_getById = async(ctx)=>{
    ctx.body=" 获取单个博客"
}
let fn_add = async(ctx) =>{
    ctx.body="新增一个id"
}
let fn_update = async(ctx) =>{
    ctx.body="修改指定id的博客"
}
let fn_del= async(ctx) =>{
    ctx.body="删除指定id的博客"
}
export default {
    'get /blogs':fn_list,
    'get /bloge/:id':fn_getById,
    'post /blogs':fn_add,
    'update /blogs':fn_update,
    'del /blogs':fn_del
}